// 加载页
<template>
    <div class="chatlist">
      <div v-for="(v,index) in friends" :key="index">
        <chat 
        :ImgUrl="v.img" 
        :name="v.nickname" 
        :lastmesg="v.last" 
        :uid="v.uid"
        :cnt="v.cnt" 
        @SendTitle='GetTitle' 
        @SendFriUid='GetUid'></chat>
      </div>
    </div>
</template>

<script>
import chat_friend from './chat_friend';

export default {
  components: {
    chat:chat_friend
  },
  props:{
    friends:{
      type:Array
    }
  },
  methods:{
    GetTitle(data){
      this.$emit('GetTitle',data);
    },
    GetUid(data){
      this.$emit('GetUid',data)
    }
  }
}

</script>

<style scoped>
@import "../style/chatlist.css";

</style>
